function fee2num(num){
    if(num=="")return num;
    if(isNaN(parseFloat(num)))return num;
	if(num.toString().indexOf(".")>-1){
		return (parseFloat(num)).toFixed(2);
	}
    var num=num.toString();
    if(num.length==1){
        return "0.0"+num;
    }else if(num.length==2){
        return "0."+num;
    }
    var fee=num.substr(0,num.length-2)+'.'+num.substr(-2,2);
    return fee;
}
function fromatTime(time){
	var datetime = new Date();
	datetime.setTime(time*1000);
	var year = datetime.getFullYear();
	var month = datetime.getMonth() + 1;
	var date = datetime.getDate();
	var hour = datetime.getHours();
	var minute = datetime.getMinutes();
	var second = datetime.getSeconds();
	var mseconds = datetime.getMilliseconds();
	if(hour<10)hour="0"+hour;
	if(month<10)month="0"+month;
	if(minute<10)minute="0"+minute;
	var timetype="m/d h:i";
	if(arguments[1])timetype=arguments[1];
	timetype=timetype.replace("y",year);
	timetype=timetype.replace("m",month);
	timetype=timetype.replace("d",date);
	timetype=timetype.replace("h",hour);
	timetype=timetype.replace("i",minute);
	timetype=timetype.replace("s",second);
	return timetype;
}
function payTypeStr(num){
	var key=parseInt(num);
	var paytype=['微信','支付宝','现金','银行卡','余额','其他'];
	return paytype[num];
}
function str2num(obj){
    //浮点转换成整数
    if(obj=="" || !obj)return 0;
    var num;
    if(obj.toString().indexOf(".")>-1){
        var temp=obj.toString().split(".");
        var temps=temp[1]+"";
        if(temps.length<2){
            num=temp[0]+temp[1]+"0";
        }else{
            num=temp[0]+temp[1];
        }
    }else{
        num=obj+"00";
    }
    num=Math.round(num);
    return num;
}
function f2num(num){
    if(num=="")return '0.00';
    if(isNaN(parseFloat(num)))return '0.00';
    if(num.toString().indexOf(".")>-1){
        return (parseFloat(num)).toFixed(2);
    }
    var num=num.toString();
    switch (num.length){
        case 0:
            return 0.00;
        case 1:
            return "0.0"+num;
        case 2:
            return "0."+num;
        default:
            var fee=num.substr(0,num.length-2)+'.'+num.substr(-2,2);
            return parseFloat(fee).toFixed(2);
    }
}
function num2fee2(){
    var a='';
}    